StdTxMeas
short byteCnt ; number of characters in text buffer
Ptr textAddr ; address of buffer containing text to measure Point *numerPt ; not really " points"; these specify the . . . Point *denomPt ; . . . character scaling factor This is Quickdraw's default low-level routine for measuring text, as used in
spExtra fields of the current GrafPort, it returns the width, in pixels, of the specified text.
byteCnt specifies the number of characters to measure.
textAddr is the address of a buffer containing the characters to be measured.
The buffer should contain at least byteCnt characters.
numerPt and . . .
denomPt are addresses of 4-byte Point structures. They specify the horizontal and vertical scaling factors to be applied to each character,
as described under StdText. Note that the addresses are passed; thus the function may modify these scaling factors.
fInfo is the address of an 8-byte FontInfo structure describing various facts about the font character spacing.
Returns: a short declaring how wide the text would be if drawn in the current font, style, and size, including the information passed in fInfo .
Notes: Use StdTxMeas only if your application intercepts the Quickdraw This is a bottleneck routine that is often intercepted by application
programs. For instance, if the application supports only one or two sizes of
text, it may be possible to write an optimized version of StdTxMeas. Another possibility is to make a smarter version that is able to interpret
embedded codes indicating changes in font size, etc.